/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import com.google.common.base.Predicate;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ import java.util.stream.Collectors;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.entity.EntityPlayerSP;
/*     */ import net.minecraft.client.settings.KeyBinding;
/*     */ import net.minecraft.entity.Entity;
/*     */ import net.minecraft.entity.EntityLivingBase;
/*     */ import net.minecraft.entity.player.EntityPlayer;
/*     */ import net.minecraft.util.math.Vec3d;
/*     */ import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
/*     */ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
/*     */ import net.minecraftforge.fml.common.gameevent.InputEvent;
/*     */ import net.minecraftforge.fml.common.gameevent.TickEvent;
/*     */ 
/*     */ 
/*     */ @EventBusSubscriber(modid = "dragoncore")
/*     */ public class or
/*     */ {
/*     */   public static KeyBinding l;
/*     */   public static KeyBinding t;
/*  25 */   public static List<EntityLivingBase> d = new ArrayList<>(); public static boolean i; private static Entity w;
/*  26 */   private static final Minecraft z = Minecraft.func_71410_x(); private static final Predicate<Entity> q;
/*     */   
/*     */   static {
/*  29 */     q = (a -> (a instanceof EntityLivingBase && a.func_70089_S() && ((EntityLivingBase)a).func_190631_cK()));
/*     */   }
/*  31 */   private static int g = -1;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public static void h() {}
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @SubscribeEvent
/*     */   public static void v(InputEvent.KeyInputEvent a) {}
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @SubscribeEvent
/*     */   public static void v(TickEvent.RenderTickEvent a) {
/*  59 */     EntityPlayerSP entityPlayerSP = z.field_71439_g;
/*  60 */     if (a.phase == TickEvent.Phase.START && z.field_71439_g != null && !z.func_147113_T()) {
/*  61 */       z();
/*  62 */       if (w != null) {
/*  63 */         Vec3d vec3d1 = w.func_174791_d();
/*  64 */         Vec3d vec3d2 = vec3d1.func_178788_d(z.field_71439_g.func_174791_d()).func_72432_b();
/*  65 */         double d1 = Math.atan2(-vec3d2.field_72450_a, vec3d2.field_72449_c) * 180.0D / Math.PI;
/*  66 */         float f = z.field_71439_g.field_70126_B;
/*  67 */         if (Math.abs(d1 - f) > 180.0D) {
/*  68 */           if (f > d1) {
/*  69 */             d1 += 360.0D;
/*  70 */           } else if (f < d1) {
/*  71 */             d1 -= 360.0D;
/*     */           } 
/*     */         }
/*  74 */         double d2 = v(f, (float)d1, a.renderTickTime);
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */         
/*  81 */         System.out.println(d2 % 360.0D);
/*  82 */         ((EntityPlayer)entityPlayerSP).field_70177_z = (float)d2 % 360.0F;
/*     */       } 
/*     */     } 
/*     */   }
/*     */   
/*     */   public static float v(float a, float f1, float f2) {
/*  88 */     return a + (f1 - a) * f2;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public static Entity v(EntityPlayer a) {
/* 109 */     List<EntityLivingBase> list = (List)a.field_70170_p.func_175674_a((Entity)a, a.func_174813_aQ().func_72314_b(10.0D, 2.0D, 10.0D), q).stream().filter(a -> a instanceof EntityLivingBase).map(a -> (EntityLivingBase)a).collect(Collectors.toList());
/* 110 */     if (i) {
/* 111 */       g++;
/* 112 */       for (EntityLivingBase entityLivingBase : list) {
/* 113 */         if (!d.contains(entityLivingBase)) {
/* 114 */           d.add(entityLivingBase);
/* 115 */           return (Entity)entityLivingBase;
/*     */         } 
/*     */       } 
/* 118 */       if (g >= d.size()) {
/* 119 */         g = 0;
/*     */       }
/* 121 */       return (Entity)d.get(g);
/*     */     } 
/* 123 */     if (!list.isEmpty()) {
/* 124 */       EntityLivingBase entityLivingBase = list.get(0);
/* 125 */       d.add(entityLivingBase);
/* 126 */       return (Entity)list.get(0);
/*     */     } 
/* 128 */     return null;
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\or.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */